<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="inc.jsp"></jsp:include>
<!DOCTYPE html>
<html>
<head>
<STYLE type=text/css>
BODY {
	FONT-SIZE: 12px;
	FONT-FAMILY: 宋体
}

TD {
	FONT-SIZE: 12px;
	COLOR: #ffffff;
	FONT-FAMILY: 宋体
}
</STYLE>
<title>果亦鲜管理系统</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>
<body>
	<SCRIPT type=text/javascript>
		var loginInputForm;
		var theForm;
		$(function() {
			$("#username").val($.cookie('loginname'));
			$("#password").val("");
			var formParam = {
				url : 'user/dologin.do',
				type: "POST",
				dataType:'json',
				success : function(data) {
					var d = $.parseJSON(data);
					if(d.status==201){
						$.messager.show({
							msg : d.msg,
							title : '提示'
						});
					}else{
						/* window.location
						.replace('${pageContext.request.contextPath}/pages/index.jsp'); */
						top.location.href="main.do";
						
						/* if(d.data!=''){
							top.location.href="main.do?referurl="+d.data;
							//d.data;
						}else{
							top.location.href="main.do";
						} */
					}
				}
			};

			$('#loginInputForm').form(formParam);


			function __doPostBack() {
				$.cookie('loginname', $("#username").val());
				$("#loginInputForm").submit();
			};
			
			$('form input').bind('keyup', function(event) {/* 增加回车提交功能 */
				if (event.keyCode == '13') {
					__doPostBack();
				}
			});

		});

		function register() {
			regDialog.dialog('open');
		}
	</SCRIPT>
	<SCRIPT src="images/login/WebResource.axd" type=text/javascript></SCRIPT>

	<SCRIPT src="images/login/WebResource(1).axd" type=text/javascript></SCRIPT>

	<SCRIPT src="images/login/ScriptResource.axd" type=text/javascript></SCRIPT>

	<SCRIPT src="images/login/ScriptResource(1).axd" type=text/javascript></SCRIPT>


	<DIV id=UpdatePanel1>
		<DIV id=div1
			style="LEFT: 0px; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #0066ff"></DIV>
		<DIV id=div2
			style="LEFT: 0px; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #0066ff"></DIV>
		<SCRIPT language=JavaScript>
			var speed = 50;
			var temp = new Array();
			var clipright = document.body.clientWidth / 2, clipleft = 0
			for (i = 1; i <= 2; i++) {
				temp[i] = eval("document.all.div" + i + ".style");
				temp[i].width = document.body.clientWidth / 2;
				temp[i].height = document.body.clientHeight;
				temp[i].left = (i - 1) * parseInt(temp[i].width);
			}
			function openit() {
				clipright -= speed;
				temp[1].clip = "rect(0 " + clipright + " auto 0)";
				clipleft += speed;
				temp[2].clip = "rect(0 auto auto " + clipleft + ")";
				if (clipright <= 0)
					clearInterval(tim);
			}
			tim = setInterval("openit()", 100);
		</SCRIPT>

		<DIV>&nbsp;&nbsp;</DIV>
		<DIV>
			<form id="loginInputForm" method="post"  onsubmit="javascript:__doPostBack()" >
				<TABLE cellSpacing=0 cellPadding=0 width=900 align=center border=0>
					<TBODY>
						<TR>
							<TD style="HEIGHT: 90px"><IMG src="images/login/login_1.gif"
								style="height:100%;width:100%" border=0></TD>
						</TR>
						<TR>
							<TD background=images/login/login_2.jpg height=300>
								<TABLE height=300 cellPadding=0 width=900 border=0>
									<TBODY>
										<TR>
											<TD colSpan=2 height=35></TD>
										</TR>
										<TR>
											<TD width=360></TD>
											<TD>
												<TABLE cellSpacing=0 cellPadding=2 border=0>
													<TBODY>
														<TR>
															<TD style="HEIGHT: 28px" width=80>登录名称：</TD>
															<TD style="HEIGHT: 28px" width=150><INPUT id="username"
																class="easyui-validatebox"
																data-options="required:true,missingMessage:'请填写登录名称'"
																style="WIDTH: 130px" name="username"></TD>
															<TD style="HEIGHT: 28px" width=370></TD>
														</TR>
														<TR>
															<TD style="HEIGHT: 28px">登录密码：</TD>
															<TD style="HEIGHT: 28px"><INPUT id="password"
																class="easyui-validatebox"
																data-options="required:true,missingMessage:'请填写登录密码'"
																style="WIDTH: 130px" type=password name="password">
															</TD>
														</TR>
														<!-- 
														<TR>
															<td></td>
															<TD style="HEIGHT: 28px">
															<INPUT id="rememberMe"  type=checkbox name="rememberMe" value="true" />记住我
															</TD>
														</TR>
														 -->
														<TR>
															<TD style="HEIGHT: 18px"></TD>
															<TD style="HEIGHT: 18px"></TD>
															<TD style="HEIGHT: 18px"></TD>
														</TR>
														<TR>
															<TD></TD>
															<TD><INPUT  id=IbtnEnter
																style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px"
														          type='image'
																src="images/login/login_button.gif"  >
															</TD>
														</TR>
													</TBODY>
												</TABLE></TD>
										</TR>
									</TBODY>
								</TABLE></TD>
						</TR>
						<TR>
							<TD><IMG src="images/login/login_3.jpg" border=0></TD>
						</TR>
					</TBODY>
				</TABLE>
			</form>
		</DIV>
	</DIV>
</body>
</html>

